<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        
        // 3、求出1000-9999之间的 4 叶玫瑰数
        for(var i = 1000 ; i < 10000; i++){
            var ge = i % 10 
            var shi =parseInt( i % 100 / 10)
            var bai = parseInt( i % 1000 / 100)
            var qian = parseInt(i / 1000)
            if( i === ge * ge * ge *ge + shi * shi * shi *shi + bai * bai * bai *bai + qian * qian * qian * qian){
                console.log('四叶玫瑰是' + i)
            }
        }
    </script>
</body>
</html>